package com.bjpowernode.javase.string;

public class IntegerTest01 {
    public static void main(String[] args) {
        int i = 10;
        System.out.println(i);

        Integer z = 100;
        System.out.println(z + 1);

        Integer a = 100;
        Integer b = 100;
        //a和b保存的内存地址一样
        System.out.println(a == b);      //true

        Integer a1 = new Integer(100);
        Integer b1 = new Integer(100);
        System.out.println(a1 == b1);    //false

        Integer a3 = 1000;
        Integer b3 = 1000;
        System.out.println(a3 == b3);    //false

        Integer a4 = new Integer(1000);
        Integer b4 = new Integer(1000);
        System.out.println(a4 == b4);    //false



        Integer x = new Integer(100);
        int y = x.intValue();
        System.out.println(y);

        Integer s = new Integer("123");
        int s1 = s.intValue();
        System.out.println(s1);

        //Integer z1 = new Integer("zhongwen");
        //error
        //NumberFormatException

        Integer s3 = 110;
        int s4 = s3;
        System.out.println(s4);

        //Integer s5 = "123";
        Integer s6 = new Integer("123");
        System.out.println(s6);

        int ret = Integer.parseInt("123");
        System.out.println(ret);

        double ret1 = Double.parseDouble("9.12");
        System.out.println(ret1);

        String hexString = Integer.toHexString(8);
        System.out.println(hexString);
    }
}
